<template>
    <div class="file">
        <div class="file-box">
            <div class="file-box" slot="reference">
                <span class="state" :class="staticClass[apiValue.status]">
                    <i class="el-icon-star-on"></i>
                </span>
                <span class="file-type" :class="typeClass[apiValue.type]">{{apiValue.type}}</span>
                <span class="file-title">{{apiValue.title}}</span>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: ['apiValue'],
    data() {
        return {
            active: false,
            typeClass: {
                GET: 'text_green',
                POST: 'text_orange',
                PUT: 'text_blue',
                DEL: 'text_red'
            },
            staticName: {
                0: '设计中',
                1: '进行中',
                2: '异常',
                3: '已完成',
                4: '已废弃',
                undefined: '',
                null: '',
            },
            staticClass: {
                0: 'text_orange',
                1: 'text_blue',
                2: 'text_red',
                3: 'text_green',
                4: 'text_gray',
                undefined: 'text_transparent',
                null: 'text_transparent',
            },
        }
    },
}
</script>

<style>

</style>